/**
 * Created by PanJiaChen on 16/11/18.
 */
import md5 from "js-md5";
/**
 * Parse the time to string
 * @param {(Object|string|number)} time
 * @param {string} cFormat
 * @returns {string}
 */
export function parseTime(time, cFormat) {
  if (arguments.length === 0) {
    return null
  }
  const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
  let date
  if (typeof time === 'object') {
    date = time
  } else {
    if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
      time = parseInt(time)
    }
    if ((typeof time === 'number') && (time.toString().length === 10)) {
      time = time * 1000
    }
    date = new Date(time)
  }
  const formatObj = {
    y: date.getFullYear(),
    m: date.getMonth() + 1,
    d: date.getDate(),
    h: date.getHours(),
    i: date.getMinutes(),
    s: date.getSeconds(),
    a: date.getDay()
  }
  const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
    let value = formatObj[key]
    // Note: getDay() returns 0 on Sunday
    if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
    if (result.length > 0 && value < 10) {
      value = '0' + value
    }
    return value || 0
  })
  return time_str
}

/**
 * @param {number} time
 * @param {string} option
 * @returns {string}
 */
export function formatTime(time, option) {
  if (('' + time).length === 10) {
    time = parseInt(time) * 1000
  } else {
    time = +time
  }
  const d = new Date(time)
  const now = Date.now()

  const diff = (now - d) / 1000

  if (diff < 30) {
    return '刚刚'
  } else if (diff < 3600) {
    // less 1 hour
    return Math.ceil(diff / 60) + '分钟前'
  } else if (diff < 3600 * 24) {
    return Math.ceil(diff / 3600) + '小时前'
  } else if (diff < 3600 * 24 * 2) {
    return '1天前'
  }
  if (option) {
    return parseTime(time, option)
  } else {
    return (
      d.getMonth() +
      1 +
      '月' +
      d.getDate() +
      '日' +
      d.getHours() +
      '时' +
      d.getMinutes() +
      '分'
    )
  }
}

/**
 * @param {string} url
 * @returns {Object}
 */
export function param2Obj(url) {
  const search = url.split('?')[1]
  if (!search) {
    return {}
  }
  return JSON.parse(
    '{"' +
    decodeURIComponent(search)
      .replace(/"/g, '\\"')
      .replace(/&/g, '","')
      .replace(/=/g, '":"')
      .replace(/\+/g, ' ') +
    '"}'
  )
}

 

/**
 * @param {Function} func
 * @param {number} wait
 * @param {boolean} immediate
 * @return {*}
 */
export function debounce(func, wait, immediate) {
  let timeout, args, context, timestamp, result

  const later = function() {
    // 据上一次触发时间间隔
    const last = +new Date() - timestamp

    // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
    if (last < wait && last > 0) {
      timeout = setTimeout(later, wait - last)
    } else {
      timeout = null
      // 如果设定为immediate===true，因为开始边界已经调用过了此处无需调用
      if (!immediate) {
        result = func.apply(context, args)
        if (!timeout) context = args = null
      }
    }
  }

  return function(...args) {
    context = this
    timestamp = +new Date()
    const callNow = immediate && !timeout
    // 如果延时不存在，重新设定延时
    if (!timeout) timeout = setTimeout(later, wait)
    if (callNow) {
      result = func.apply(context, args)
      context = args = null
    }

    return result
  }
}

export function url_params (data, isPrefix) {

  isPrefix = isPrefix ? isPrefix : false

  let prefix = isPrefix ? '?' : ''

  let _result = []

  for (let key in data) {

    let value = data[key]

    // 去掉为空的参数

    if (['', undefined, null].includes(value)) {

      continue

    }

    if (value.constructor === Array) {

      value.forEach(_value => {

        _result.push(encodeURIComponent(key) + '[]=' + encodeURIComponent(_value))

      })

    } else {

      _result.push(encodeURIComponent(key) + '=' + encodeURIComponent(value))

    }

  }



  return _result.length ? prefix + _result.join('&') : ''

}

function getCurrentDateTime() {
  var currentDate = new Date();

  var year = currentDate.getFullYear();
  var month = (currentDate.getMonth() + 1).toString().padStart(2, '0');
  var day = currentDate.getDate().toString().padStart(2, '0');
  var hours = currentDate.getHours().toString().padStart(2, '0');
  var minutes = currentDate.getMinutes().toString().padStart(2, '0');
  var seconds = currentDate.getSeconds().toString().padStart(2, '0');

  var dateTime = year + month  + day + hours;

  return dateTime;
}

// 判断是否是视频

export function is_video(path){
  let parts = path.split('.');
  let hz = ''
  if (parts.length > 1) {
    hz =  parts[parts.length - 1];  // 返回最后一个部分作为后缀
  }
  if (['mp4','MP4','MOV','mov'].indexOf(hz) > -1){
    return true
  }
  return false
}

// 获取key
export function get_key(filename){
  // 找到最后一个点的位置
  var dotIndex = filename.lastIndexOf(".");
  var hz = ''
  // 检查是否找到点，并且它不在文件名的起始位置或结尾位置
  if (dotIndex > -1 && dotIndex < filename.length - 1) {
    // 使用 substr 方法获取最后一个点之后的字符
    hz = filename.substr(dotIndex + 1);
    
  } 

  let key =  getCurrentDateTime()+ '_' +  md5(filename) +'.'+ hz

  return key

  
}

// 生成hap链接
export function get_hap(row){
  // let time_ = Math.round(new Date() / 1000)
  let pkg = row.pkg
  let username = row.username
  let tg = row.tg
  let bookid = row.channel_config.a1
  let author_id = row.channel_config.a1
  let category_id = row.channel_config.a2
  if (!bookid || bookid == true) {
    bookid = 10873
  }
  if (!author_id || author_id == true){
    author_id = 36
  }

  if (!category_id || category_id == true){
    category_id = 1
  }

  let pkg_params = {
    'com.xmlx.muguang': "hap://app/com.xmlx.muguang/spa?bookid=" + bookid + "&channel_id={qudao}&platform_back={pingtai}&event_type=active&s_tid=tid1688&dp_type=hap&QUICK_APP_ST_CHANNEL="+username,
    'com.xmlx.lanhai': "hap://app/com.xmlx.lanhai/spa?bookid=" + bookid + "&channel_id={qudao}&platform_back={pingtai}&event_type=active&s_tid=tid1688&dp_type=hap&QUICK_APP_ST_CHANNEL="+username,
    'com.zsyd.mjzs': "hap://app/com.xmlx.muguang/spa?bookid=" + bookid + "&channel_id={qudao}&platform_back={pingtai}&event_type=active&s_tid=tid1688&dp_type=hap&QUICK_APP_ST_CHANNEL="+username,
    'com.shiyue.pkg': "hap://app/com.shiyue.pkg/pages/index?bookid=" + bookid + "&channel_id={qudao}&platform_back={pingtai}&event_type=active&s_tid=tid1688&dp_type=hap&QUICK_APP_ST_CHANNEL="+username,
    'com.jianyue.photo': "hap://app/com.jianyue.photo/pages/index?category_id=" + category_id + "&author_id="+ author_id+"&channel_id={qudao}&platform_back={pingtai}&event_type=active&s_tid=tid1688&dp_type=hap&QUICK_APP_ST_CHANNEL="+username,
    'com.xst': '--'
  }

  let p = pkg_params[pkg]
  if(!p){
    return '--'
  }
  // console.log(pkg, username, tg, p)
  p = p.replace('{qudao}',username)
  p = p.replace('{pingtai}', tg)
  // p = p.replace('{shijianchuo}',time_)
  if (tg != 'jl'){
    p += "&clickid=9527666"
  }
  if(['xiaomi','oppo','huawei'].indexOf(tg)> -1){
    return "快应用: " + p + " <br /> 落地页:"+ p +"&h5=h5"
  }
  return p
}

// 监测链接
export function get_jiance(row){
  let pkg = row.pkg
  let username = row.username
  let tg = row.tg
  if (tg == 'jl'){

    let url = 'https://kyy.jianyue668.com/api/jl/click2'
    return  url + "?pkg="+pkg+"&channel="+username+"&event_type=active&aid=__AID__&cid=__CID__&oaid=__OAID__&callback=__CALLBACK_PARAM__&promotion_id=__PROMOTION_ID__&mid4=__MID4__&project_id=__PROJECT_ID__"

  }else if (tg == 'oppo'){

    return "https://kyy.jianyue668.com/api/oppo/click?channel="+username+"&pkg=$pkg$&imei=$im$&ad_id=$ad$&OAID=__OAID__&account=" + row.show
  }else if (tg == 'vivo'){

    // 快应用 : https://htlchannel.ydwhgs.com/api/vivo/click?channel="+username+"&active_type=ACTIVATION <br /> 落地页 : 
    return "快应用 : https://kyy.jianyue668.com/api/vivo/click?pkg="+pkg+"&channel="+username+"&active_type=ACTIVATION&oaid=__OAID__&requestId=__REQUESTID__&advertiserId=__ADVERTISERID__&oaidplain=__OAIDPLAIN__&creativeId=__CREATIVEID__&ts=__TS__ <br /> 落地页 : https://kyy.jianyue668.com/api/vivo/click?pkg="+pkg+"&channel="+username+"&active_type=REACTIVATION&oaid=__OAID__&requestId=__REQUESTID__&advertiserId=__ADVERTISERID__&oaidplain=__OAIDPLAIN__&creativeId=__CREATIVEID__&ts=__TS__"
  } else if(tg == 'huawei_not'){

    return 'https://kyy.jianyue668.com/api/huawei/click?channel='+username+'&content_id={content_id}&adgroup_id={adgroup_id}&campaign_id={campaign_id}&oaid={oaid}&trace_time={trace_time}&callback={callback}&corp_id={corp_id}&app_id={app_id}'
  } else if (tg == 'xiaomi'){

    return '快应用：https://kyy.jianyue668.com/api/xiaomi/click?channel='+username+'&response_validate=false&oaid=__OAID__&click_time=__TS__&app_id=__APPID__&adid=__ADID__&campaign_id=__CAMPAIGNID__&callback=__CALLBACK__&sign=__SIGN__&ip=__IP__ <br /> 落地页：https://kyy.jianyue668.com/api/xiaomi/click2?channel='+username+'&response_validate=false&oaid=__OAID__&click_time=__TS__&app_id=__APPID__&adid=__ADID__&campaign_id=__CAMPAIGNID__&callback=__CALLBACK__&sign=__SIGN__&ip=__IP__'
  }else{
    return '--'
  }
}

// 落地页链接
export function get_luodiye(langind_list,row){
  console.log('get_luodiye',row)
  let username = row.username;
  let langind_id = row.id;
  let tg = row.tg;
  if (row.channel_config && row.channel_config != undefined){
    var pkg = row.channel_config.a10
  }else{
    var pkg = row.pkg
  }
  let event_type = 'page_view'
  if(tg == 'xiaomi'){
    event_type == 'ADD_DESKTOP'
  }
  
  
  if(langind_list[langind_id]){

    let h5 = langind_list[langind_id].url +"?pkg="+pkg+"&channel=" + username + "&qd=" +  username + "&event_type="+event_type+"&platform_back="+tg
    // oppo 需要把投流账户放入链接中
    if(tg == 'oppo') {
      h5 = h5 + '&account=' + row.show
    }

    if (tg == 'oppo' || tg == 'xiaomi' || tg == 'huawei'){
      return '快应用：'+h5 +'<br /> 落地页：'+ h5+'&h5=h5'
    }
    
    return h5

  }else{
    return '--'
  }
}

export let oppo_account = {
  '1000439448': 'SMBXA-澜海5-XXL',
  '1000439447':'SMBXA-澜海4-XXL',
  '1000439446':'SMBXA-澜海3-XXL',
  '1000439445':'SMBXA-澜海2-XXL',
  '1000439444':'SMBXA-澜海1-XXL',
    // oppo第二个投流代理
  '1000474523':'SMBHUB-黎晓A1-XXL',
  '1000474526':'SMBHUB-黎晓A2-XXL'
}
export let click_menu = {
  "manu_ad": "厂商广告",
  "baidu_ad": "百度广告",
  "app_ad": "唤醒广告",
  "web_ad": "web广告",
}


export let xm_pkgs = [
  
  { label: "所有包", key: "" },
  { label: "测试包1", key: "com.ceshi.con"},
  { label: "测试包2", key: "com.ceshi2.con" }
]
// 广告类型
export let adv_type = {
  "screenInsertionArray": "插屏广告",
  "nativeArray": "原生模板广告",
  "floatArray": "竞价广告",
  "advArray": "目标广告",
  "videoArray": "激励视频广告",
  "ylhArray": "优量汇广告",
  "baiduArray":"百度广告"
}

// 广告类型映射
export let advertisingType = {
  'screenInsertionArray' : 9991,
  'nativeArray' : 9991,
  'floatArray' : 9991,
  'advArray' : 9991,
  'videoArray' : 9991,
  'ylhArray' : 9992,
  'baiduArray' : 9993,
}

// 广告模板
export let adv_space = {
  "top": "顶部广告",
  "template": "模板广告",
  "banner": "banner广告",
  "rewardedVideo": "激励视频广告",
  "interstitialAd": "插屏广告",
  "openAd": "开屏广告",
  
}

export let fz_pkgs = [
]
export let pkgs = xm_pkgs.concat(fz_pkgs)

export let phone_mod = {'MI PAD 4': ' 小米平板4', 'V2061A': 'iQOO U3', 'M2011J18C': '小米 4 Pro Max', 'LE2100': 'OnePlus 9R', 'RMX1901': 'OPPO  realme X', 'PCHM10': 'OPPO A11', 'PCHM00': 'OPPO A11n ', 'PADT00': 'OPPO A3', 'PDVM00': 'OPPO A32', 'OPPO A33m': 'OPPO A33m', 'PEFM00': 'OPPO A35', 'OPPO A37m': 'OPPO A37m', 'OPPO A37t': 'OPPO A37t', 'PBBM30': 'OPPO A5', 'PBAM00': 'OPPO A5', 'PBAT00': 'OPPO A5', 'PBBT30': 'OPPO A5', 'PECM30': 'OPPO A53型号', 'PEMM00': 'OPPO A55', 'PEMT00': 'OPPO A55', 'PECM20': 'OPPO A55', 'PEMT20': 'OPPO A55', 'PEMM20': 'OPPO A55全网通版', 'PFVM10': 'OPPO A56', 'PFTM20': 'OPPO A57', 'OPPO A57': 'OPPO A57', 'OPPO A57t': 'OPPO A57t', 'PBFT00': 'OPPO A7', 'PDYM20': 'OPPO A72', 'PDYM10': 'OPPO A72n', 'OPPO A73': 'OPPO A73', 'OPPO A73t': 'OPPO A73t', 'OPPO A77': 'OPPO A77', 'OPPO A79': 'OPPO A79', 'OPPO A79t': 'OPPO A79t', 'PBBT00': 'OPPO A7x全网通版', 'PDBM00': 'OPPO a8', 'OPPO A83t': 'OPPO A83t ', 'PDAM10': 'OPPO A9', 'PCAT10': 'OPPO A9', 'PDAT10': 'OPPO A9', 'PCPM00': 'OPPO a91', 'PEHM00': 'OPPO A93', 'PFGM00': 'OPPO A93s 5G', 'PFUM10': 'OPPO a96', 'PFTM10': 'OPPO A97', 'PHQ110': 'OPPO A98', 'PCET00': 'OPPO A9X', 'PCEM00': 'OPPO A9x系列', 'PAFT00': 'OPPO Find X', 'oppox3': 'OPPO Find X3', 'PGGM10': 'OPPO K10X', 'PCGM00': 'OPPO k3', 'PERM00': 'OPPO K7x', 'PEXM00': 'OPPO K9', 'PERM10': 'OPPO K9s', 'OPD2101': 'OPPO Pad', 'OPPO R11 Pluskt': 'OPPO R11 Pluskt', 'OPPO R11s Plus': 'OPPO R11s Plus', 'OPPO R11s Plust': 'OPPO R11s Plust', 'PFCM00': 'OPPO R15', 'PACM00': 'OPPO r15标准版全网通', 'PAAT00': 'OPPO R15梦境版', 'PBET00': 'OPPO R17', 'OPPO R9 Plustm A': 'OPPO R9 Plustm A', 'OPPO R9m': 'OPPO R9m', 'OPPO R9s': 'OPPO R9s', 'OPPO R9s Plus': 'OPPO R9s Plus', 'OPPO R9sk': 'OPPO R9sk', 'OPPO R9st': 'OPPO R9st', 'OPPO R9tm': 'OPPO R9tm', 'RMX3615': 'OPPO realme 10', 'RMX3706': 'OPPO realme GT Neo 5', 'RMX3043': 'OPPO realme V13', 'RMX3361': 'OPPO realme X9', 'RMX3663': 'OPPO realme10Pro', 'RMX3687': 'OPPO realme10Pro+', 'RMX3093': 'OPPO realmeV15', 'RMX3142': 'OPPO realme真我Q3 Pro', 'PCAM00': 'OPPO Reno', 'PCAT00': 'OPPO Reno', 'PCDM00': 'OPPO reno', 'PGBM10': 'OPPO Reno 8', 'PCLM10': 'OPPO Reno Ace', 'PDHM00': 'OPPO Reno Ace 2', 'PCDM10': 'OPPO Reno z', 'PCDT10': 'OPPO Reno z', 'PCKM00': 'OPPO reno2', 'PCCM00': 'OPPO Reno2', 'PCLM50': 'OPPO Reno3元气版', 'PDNM00': 'OPPO Reno4', 'PDPT00': 'OPPO Reno4', 'PDST00': 'OPPO Reno4', 'PDNT00': 'OPPO Reno4 pro', 'PEAT00': 'OPPO Reno4SE', 'PEQM00': 'OPPO Reno5', 'PEGT00': 'OPPO Reno5', 'PEYM00': 'OPPO Reno5', 'PEGT10': 'OPPO Reno5', 'PEGM10': 'OPPO Reno5 K', 'PDSM00': 'OPPO Reno5 Pro', 'PDRM00': 'OPPO Reno5 Pro+', 'PEPM00': 'OPPO Reno6 Pro', 'PENM00': 'OPPO Reno6 Pro+', 'PFJM10': 'OPPO Reno7', 'PFDM00': 'OPPO Reno7 Pro', 'PGAM10': 'OPPO Reno8 Pro', 'PFZM10': 'OPPO Reno8 Pro+', 'PHM110': 'OPPO Reno9', 'PCHM30': 'OPPO a11x', 'PECT30': 'OPPO A5', 'PEHT00': 'OPPO a53 5G', 'PDYT20': 'OPPO A725G', 'PBFM00': 'OPPO a7全网通版', 'PCAM10': 'OPPO A9', 'PDKM00': 'OPPO a92s', 'PDKT00': 'OPPO A92s', 'PHA120': 'OPPO a96', 'PBCM30': 'OPPO k1', 'PGJM10': 'OPPO K10', 'PGIM10': 'OPPO K10Pro PGIM10', 'PCNM00': 'OPPO K5', 'PGW110': 'OPPO PHM110', 'PBCM10': 'OPPO R15X', 'PBCT10': 'OPPO r15x', 'PACT00': 'OPPO R15移动版', 'PBEM00': 'OPPO R17', 'PBDM00': 'OPPO r17Pro', 'RMX3350': 'OPPO realme GT Flash', 'RMX3031': 'OPPO realme GT Neo', 'RMX3357': 'OPPO realme GT Neo2T', 'RMX2117': 'OPPO Realme Q2', 'RMX2173': 'OPPO Realme Q2 Pro ', 'RMX2205': 'OPPO Realme Q3 Pro', 'RMX3042': 'OPPO realme Q3i', 'RMX3478': 'OPPO realme Q5', 'RMX3574': 'OPPO Realme Q5i', 'RMX3041': 'OPPO realme V13', 'RMX3092': 'OPPO Realme V15', 'RMX3611': 'OPPO Realme V20', 'RMX3571': 'OPPO Realme V23', 'RMX1991': 'OPPO realme X', 'RMX2111': 'OPPO Realme x7', 'RMX2176': 'OPPO realme x7', 'RMX2121': 'OPPO realme X7 Pro', 'RMX3366': 'OPPO Realme X9 Pro', 'RMX3560': 'OPPO realme 真我GT Neo3', 'RMX2071': 'OPPO realme5G', 'RMX2202': 'OPPO RealmeGT', 'RMX3562': 'OPPO realmeGT Neo3', 'RMX3370': 'OPPO realmeGTNeo2', 'RMX3161': 'OPPO RealmeQ3', 'RMX3125': 'OPPO RealmeV11s', 'RMX2025': 'OPPO RealmeX50', 'RMX2142': 'OPPO realmex505G', 'RMX3115': 'OPPO realmex7pro', 'M2007J3SC': 'OPPO Redmi K30S', '21091116UC': 'OPPO Redmi Note 11 Pro', '22095RA98C': 'OPPO Redmi Note 11R', '22041216UC': 'OPPO Redmi Note 12', '22101316UCP': 'OPPO Redmi Note12', 'PCRT01': 'OPPO Reno3 元气版', 'PDPM00': 'OPPO Reno4', 'PELM00': 'OPPO Reno5', 'PESM10': 'OPPO Reno5K', 'PEGM00': 'OPPO reno5全网通版', 'PGX110': 'OPPO Reno9Pro', 'RMX3310': 'OPPO RMX3310', 'RMX3619': 'OPPO RMX3619', 'RMX2201': 'OPPO 旗下 realme v3', 'RMX3121': 'OPPO 旗下Realme V11', 'RMX3122': 'OPPO 旗下Realme V11 5G', 'RMX3610': 'OPPO 旗下realme V20', 'RMX2200': 'OPPO 旗下realmeX的青春版手机', 'RMX3617': 'OPPO 真我10s', 'RMX3462': 'OPPO 真我Q3t', 'RMX3372': 'OPPO 真我Q5 Pro', 'RMX3576': 'OPPO 真我V23i', 'RMX3461': 'OPPO Realme Q3s', '220233L2C': 'OPPO Redmi 10A', 'M2003J15SC': 'OPPO Redmi 10X', 'M2004J19C': 'OPPO Redmi 9', '22122RK93C': 'OPPO Redmi K60', 'M2007J22C': 'OPPO Redmi Note 9', 'M2007J17C': 'OPPO Redmi Note9Pro', 'M2006J10C': 'OPPO RedmiK30', 'V1824A': 'VIVO iQOO', 'V1914A': 'VIVO iQOO Neo', 'V2066A': 'VIVO IQOO U1X', 'V2065A': 'VIVO iqoo u1x', 'V2180GA': 'VIVO iqoo u5x', 'V2012A': 'VIVO iQOO Z1', 'V1955A': 'VIVO NEX 3 5G', 'V1832A': 'VIVO S1', 'V2130A': 'VIVO S10e', 'V2207A': 'VIVO S15 Pro', 'V1932A': 'VIVO S5', 'V2020A': 'VIVO S7', 'V2020CA': 'VIVO S7', 'V2031A': 'VIVO S7e', 'V2031EA': 'VIVO S7e 活力版', 'V2023EA': 'VIVO s7e活力版', 'V2080A': 'VIVO S7t', 'V2072A': 'VIVO S9', 'V2048A': 'VIVO s9e', 'V1941A': 'VIVO U3', 'V2099A': 'VIVO V2099A', 'vivo X20': 'VIVO X20', 'vivo X20Plus': 'VIVO X20Plus', 'vivo X21': 'VIVO X21', 'vivo X21A': 'VIVO X21A', 'vivo X21i A': 'VIVO X21i A', 'V1838A': 'VIVO X27', 'V1829T': 'VIVO x27', 'V1938CT': 'VIVO X30', 'V2001A': 'VIVO X50', 'V2046A': 'VIVO X60', 'V2133A': 'VIVO X70', 'vivo X9i': 'VIVO X9i', 'vivo X9': 'VIVO X9i', 'vivo X9s': 'VIVO X9s', 'vivo X9s Plus': 'VIVO X9s Plus', 'V2140A': 'VIVO Y10', 'V2168A': 'VIVO Y10 T1', 'V1901A': 'VIVO Y3', 'V2034A': 'VIVO Y30', 'V2068A': 'VIVO Y31s T1 版', 'V2158A': 'VIVO Y32', 'V2157A': 'VIVO Y52s', 'vivo Y53': 'VIVO Y53', 'V2111A': 'VIVO Y53s', 'V2123A': 'VIVO Y53s', 'V2069A': 'VIVO Y53s', 'V2156A': 'VIVO Y55s型号', 'V2002A': 'VIVO Y70s', 'V2102A': 'VIVO Y70s', 'vivo Y71': 'VIVO Y71', 'vivo Y75': 'VIVO Y75', 'vivo Y75A': 'VIVO Y75A', 'V2069BA': 'VIVO Y75s 5G ', 'V2219A': 'VIVO Y77', 'V1913A': 'VIVO Y7s', 'vivo Y83A': 'VIVO Y83', 'vivo Y85': 'VIVO Y85', 'vivo Y85A': 'VIVO Y85A', 'V1818A': 'VIVO Y93', 'V1813A': 'VIVO y93', 'V1818T': 'VIVO y93', 'vivo Z1i': 'VIVO Z1i', 'V2073A': 'VIVO Z3', 'vivo Z3x': 'VIVO Z3x', 'V1921A': 'VIVO z5', 'V1911A': 'VIVO Z5x', 'V1990A': 'VIVO Z5x', 'V1832T': 'VIVO1832', 'V2199A': 'VIVO iQOO Neo6 SE', 'V2055A': 'VIVO iQOO Neo 5', 'V1981A': 'VIVO iQOO Neo3', 'V1986A': 'VIVO iQOO Neo3', 'V2118A': 'VIVO iQOO Neo5', 'V2023A': 'VIVO iQOO U1', 'V2106A': 'VIVO iQOO U3x', 'V2165A': 'VIVO IQOO U5', 'V2148A': 'VIVO iQOO Z5 Pro', 'V2131A': 'VIVO IQOO Z5x 5G', 'V2164KA': 'VIVO iQOO Z6x', 'V2220A': 'VIVO iQOOZ6', 'V2121A': 'VIVO S10', 'V2162A': 'VIVO S12', 'V2190A': 'VIVO S15e', 'V2203A': 'VIVO S15Pro', 'V2230A': 'VIVO S15Pro', 'V2239A': 'VIVO S16e', 'V1831A': 'VIVO s1全网通版', 'V1963A': 'VIVO S5', 'V1962A': 'VIVO s6', 'V2115A': 'VIVO T1', 'V2188A': 'VIVO T2', 'vivo X20A': 'VIVO x20A', 'V1809A': 'VIVO X23', 'V1829A': 'VIVO x27', 'V1836A': 'VIVO X27Pro', 'V2059A': 'VIVO X60', 'V1930A': 'VIVO y3', 'V2166BA': 'VIVO Y30g', 'V2066BA': 'VIVO Y30g', 'V2036A': 'VIVO Y30标准版', 'V2054A': 'VIVO Y31s', 'V2166A': 'VIVO Y33s', 'V1965A': 'VIVO Y50', 'V2057A': 'VIVO Y52s', 'V2164A': 'VIVO Y55s', 'V1934A': 'VIVO y5s', 'V1732A': 'VIVO Y81s', 'V1732T': 'VIVO Y81s', 'V1818CA': 'VIVO Y93s', 'V1938T': 'VIVO y97', 'V1945A': 'VIVO Y9s', 'RedmiK30ProZoomEdition': '红米 K30 Pro', '22011211C': '红米 K50', 'Redmi Note 3': '红米 Note 3', 'Redmi Note 4': '红米 Note 4', '2201116SC': '红米 Note11E Pro', 'RedmiK30Pro': '红米_K30 Pro', 'M2004J7AC': '红米 10x', 'M2004J7BC': '红米 10X', '22101320C': '红米 12', '22120RN86C': '红米 12c ', 2014813.0: '红米 2', 'Redmi 3S': '红米 3S ', 'Redmi4': '红米 4', 'Redmi 4': '红米 4', 'Redmi 4A': '红米 4A ', 'Redmi 4X': '红米 4X', 'Redmi4X': '红米 4X', 'Redmi 5': '红米 5', 'Redmi5': '红米 5', 'Redmi 5 Plus': '红米 5 Plus', 'Redmi5Plus': '红米 5 Plus', 'Redmi 5A': '红米 5A', 'Redmi5A': '红米 5A', 'Redmi 6 Pro': '红米 6 Pro', 'Redmi6Pro': '红米 6 Pro', 'Redmi 6A': '红米 6A', 'Redmi7': '红米 7', 'Redmi7A': '红米 7A', 'Redmi8': '红米 8', 'Redmi 8A': '红米 8A', 'RedmiK20': '红米 K20', 'RedmiK20ProPremiumEdition': '红米 K20 Pro ', 'Redmi K20 Pro Premium Edition': '红米 K20高级版', 'Redmi K30': '红米 K30', 'Redmi K30 5G': '红米 K30 5G', 'RedmiK305GSpeed': '红米 K30 5G极速版', 'RedmiK30i5G': '红米 K30i5G', 'Redmi K30 Pro': '红米 K30Pro', 'Redmi K30 Pro Zoom Edition': '红米 K30Pro', 'Redmi K30 5G Speed': '红米 k30极速版', '22021211RC': '红米 K50', '22041219C': '红米 Note 11E Pro', 'RedmiNote3': '红米 Note 3', 'RedmiNote4X': '红米 Note 4X', 'RedmiNote5': '红米 Note 5', 'Redmi Note 5A': '红米 Note 5A', 'RedmiNote5A': '红米 Note 5A', 'Redmi Note 7': '红米 Note 7', 'Redmi Note 8': '红米 Note 8', 'M2104K10AC': '红米 Note10', '21091116AC': '红米 note11', '21121119SC': '红米 Note11', '22101316C': '红米 Note12', 'Redmi Note 4X': '红米 Note4X', 'Redmi Note 5': '红米 Note5', 'Redmi Note 7Pro': '红米 Note7pro', 'Redmi Note 8Pro ': '红米 Note8Pro', 'RedmiNote8Pro': '红米 Note8pro', 'M2010J19SC': '红米 Note9', 'Redmi Pro': '红米 Pro', 'Redmi S2': '红米 S2', '22101317C': '红米 Note 12', 'M2012K10C': '红米 K40', '23013RK75C': '红米 K60', 'CHL-AL00': '荣耀 X20 SE', 'TFY-AN00': '荣耀 X30i', 'M2012K11C': '小米 11', '2207122MC': '小米 12S Pro', 'MI 5s Plus': '小米 5s Plus', 'MI 6X': '小米 6X', 'MI6X': '小米 6X', 'MiNote3': '小米 Note3', 'Mi10': '小米 10', 'M2102J2SC': '小米 10s', 'M2002J9E': '小米 10青春版', 'M2012K11AC': '小米 10新版本Redmi K40', 'M2006C3LC': '小米 10至尊纪念版', 'M2007J1SC': '小米 10至尊纪念版', 'M2102K1AC': '小米 11 Pro手机', 'M2102K1C': '小米 11Ultra', 'M2101K9C': '小米 11青春版', '2107119DC': '小米 11青春活力版', '2203121C': '小米 12 Ultra', '2201122C': '小米 12pro', '2206123SC': '小米 12S', '2206122SC': '小米 12S Pro', '2112123AC': '小米 12X', '2201123C': '小米 12标准版', '2211133C': '小米 13', 'Mi-4c': '小米 4c', 'MI 4S': '小米 4S', 'MI5': '小米 5', 'MI 5s': '小米 5s', 'MI5sPlus': '小米 5s Plus', 'MI 5X': '小米 5X', 'MI6': '小米 6', 'MI 8': '小米 8', 'MI 8 Explorer Edition': '小米 8explorer edition', 'MI 8 SE': '小米 8se', 'MI8UD': '小米 8屏幕指纹版', 'MI 8 Lite': '小米 8青春版', 'MI 9': '小米 9', 'Mi9 Pro 5G': '小米 9 Pro', 'MI9SE': '小米 9 SE', 'MI 9 Transpar ent Edition': '小米 9透明尊享版', 'MI CC 9': '小米 CC9', 'MI CC9 Pro Premium Edition': '小米 CC9 pro 美图定制版', 'MI CC9 Pro': '小米 CC9Pro', 'MICC9ProPremiumEdition': '小米 cc9pro premium edition', 'MI CC 9 Meitu Edition': '小米 CC9美图定制版', '2109119BC': '小米 Civi', '2209129SC': '小米 Civi2', 'MI MAX': '小米 Max', 'MI MAX 3': '小米 Max 3', 'MI MAX 2': '小米 Max2', 'MI CC 9e': '小米 micc9e', 'MIX 2': '小米 MIX 2', 'MIX 2S': '小米 MIX 2s', 'MIX2S': '小米 MIX 2S', 'MIX2': '小米 mix2', 'MIX 3': '小米 MIX3', 'MIX3': '小米 MIX3', '2106118C': '小米 MIX4', 'Mi Note 3': '小米 Note 3', 'MI PAD 4 PLUS': '小米 PAD 4 PLUS', 'MI PLAY': '小米 Play', 'MIPLAY': '小米 Play', 'Mi 10 Pro': '小米 pro10', 'M2103K19C': '小米 Redmi Note 10 Pro', 'MIX': '小米 X', '22081212C': '小米 红米K50', '22041216C': '小米 红米note11', 'M2105K81AC': '小米 平板5', 'MI8ExplorerEdition': '小米 透明探索版本8', 'PGZ110': '一加 10T', 'NE2210': '一加10 Pro', 'GM1910': '一加7pro', 'HD1910': '一加7TPro', 'IN2010': '一加8', 'IN2020': '一加8pro', 'LE2110': '一加9', 'LE2120': '一加9 pro', 'MT2110': '一加9RT', 'PGKM10': '一加Ace', 'PHK110': '一加Ace2', 'PHP110': '一加Ace2V', 'KB2000': '一加OnePlus 8T'}


export var brand = {
  'oppo':'oppo', 
  'vivo': "vivo", 
  'xiaomi':'小米',
  'huawei':'华为',
  'honor':'荣耀',
  'meizu':'魅族',
  'oneplus':'一加', 
  'realme':'真我'}
  
export var brand1={
  'oppo':'oppo', 
  'vivo': "vivo", 
  'xiaomi':'小米',
  'huawei':'华为'
}

export var qd_List = ['sanming','fuzhouqf']
